<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>分页查询查询</title>
<link rel="stylesheet" href="css/bootstrap.css" />
</head>

<body>
    <tr align="center">
		<ul class="pager">
			<li><a href="demo.do?aa=1">首页</a></li>
			<c:if test="${aa-1>0}">
			<li><a href="demo.do?aa=${(aa-1)}">上一页</a></li>
			</c:if>
			<c:if test="${aa-1<=0}">
			<li class="disabled"><a href="demo.do?aa=${(aa-1)}">上一页</a></li>
			</c:if>
			<c:forEach var="x" begin="${aa-3>0 ? (aa-3) : 1 }" end="${aa+3<ys ? (aa+3) : ys }" step="1">
			<!-- 判断是否为前页 -->
			<c:if test="${aa==x }">
			<li class="disabled"><a href="#">${x }</a></li>
			</c:if>
			<c:if test="${aa!=x }">
			<li ><a href="demo.do?aa=${x}">${x }</a></li>
			</c:if>
			</c:forEach>
			<c:if test="${aa+1<zysh}">
			<li><a href="demo.do?aa=${(aa+1)}">下一页</a></li>
			</c:if>
			<c:if test="${aa+1>=zysh}">
			<li class="disabled"><a href="demo.do?aa=${(aa+1)}">下一页</a></li>
			</c:if>
			<li><a href="demo.do?aa=${ys}">尾页</a></li>
		</ul>
	</tr>
	
	<table class="table table-striped table-hover table-condensed ">
		<tr style="color: red" align="center">
			<td style="font-size: 200%">用户编号</td>
			<td style="font-size: 200%">用户名</td>
			<td style="font-size: 200%">用户密码</td>
			<td style="font-size: 200%">电子邮箱</td>
			<td style="font-size: 200%">用户性别</td>
			<td style="font-size: 200%">用户地址</td>
			<td style="font-size: 200%">爱好</td>
			<td style="font-size: 200%">添加时间</td>
			<td style="font-size: 200%">操作</td>
			<td><a class="btn btn-primary btn-lg" href="add.jsp">添加</a></td>
		</tr>
		<c:forEach var="s" items="${l}" varStatus="status">
			<tr>
				<td>${s.user_id }</td>
				<td>${s.user_nickname }</td>
				<td>${s.user_password }</td>
				<td>${s.user_email }</td>
				<td>${s.user_sex }</td>
				<td>${s.user_address }</td>
				<td>${s.user_hobby }</td>
				<td>${s.user_addtime }</td>
				<td><a class="btn btn-danger btn-xs"
					href="delete.do?id=${s.user_id }">删除</a> <a type="button"
					class="btn btn-primary btn-sm" href="chk.jsp">查看</a></td>
				<td><a class="btn btn-danger" href="xg.do?id=${s.user_id }">修改</a>
				</td>
			</tr>
		</c:forEach>

	</table>

</body>

</html>
</body>
</html>